home *** CD-ROM | disk | FTP | other *** search
/ PD Collection CD 1 / PD Collection CD 1.iso / textual / tex / files / !tex / TeXsource / commontex / h / str < prev    next >
Encoding:
Text File  |  1988-04-08  |  842 b   |  40 lines

  1. /*
  2.  *    Copyright 1986, 1987 Pat Joseph Monardo. All rights reserved.
  3.  *    Copying of this file is granted according to the provisions 
  4.  *    specified in the file COPYING which must accompany this file.
  5.  */
  6.  
  7.  
  8. /*
  9.  *        string.h
  10.  */
  11.  
  12. global    ptr        str_start[];
  13. global    str        str_ptr;
  14.  
  15. global    ascii    str_pool[];
  16. global    ptr        pool_ptr;
  17.  
  18. global    str        null_str;
  19.  
  20. #define    length(S)            (str_start[S + 1] - str_start[S])
  21. #define    cur_length()        (pool_ptr - str_start[str_ptr])
  22.  
  23. #define    append_char(C)         {str_pool[pool_ptr] = C; incr(pool_ptr);}
  24. #define    flush_char()        decr(pool_ptr)
  25.  
  26. #define    str_room(S) \
  27.     {if (pool_ptr + S >= POOL_SIZE) \
  28.         overflow("pool_size", POOL_SIZE);}
  29.  
  30. str        make_string();
  31. str        make_string_given();
  32.  
  33. #define    flush_string() \
  34.     {decr(str_ptr); pool_ptr = str_start[str_ptr];}
  35.  
  36. bool    str_eq_buf();
  37. bool    str_eq_str();
  38.  
  39. int        init_strings();
  40.